SEARCH

Syntax: SEARCH (add1 TO add2, tofind$)
        (TinyToolkit and BTool)
    or: SEARCH (add1 TO add2, tofind$!)
        (BTool)
    or: SEARCH (array$, tofind$, start, compare [,row] )
        (Array)
Location: TinyToolkit, BTool and Array

SEARCH has two very distinct functions.

One is to search memory for a specified string - refer to MSEARCH.

The other is provided by the Array toolkit.

Here, the function searches in a two or three dimensional string array (array$) for the string ToFind$.  The search is not case-sensitive.

SEARCH will only ever look at one row, which is a problem with three-dimensional arrays.  The optional row parameter can be used to specify which row is to be searched (default 0).

The start parameter allows you to specify the element number within the row where the search should begin (the first element is 0).

Compare specifies the number of characters at the start of each entry to ignore (normally use 0).

The search will stop and return the element number if tofind$ is found within an entry, BUT not if the entry and tofind$ are identical.

Cross-Reference:
See INSTR and INARRAY%
